package com.sto.common.designMode.factory;

/**
 * @author ChenPeng
 * @since 2022-07-23 23:49
 */
public class OperationDiv implements AbstractOperation {
    @Override
    public Double getResult(Double numberA, Double numberB) throws Exception {
        if (numberB == 0) {
            throw new Exception("除数不能为零");
        }
        return numberA / numberB;
    }
}
